<h2>mach_rpc_trap</h2>
<hr>
<p>
<strong>System Trap</strong> - Real-Time RPC trap.
<h3>SYNOPSIS</h3>
<pre>
<strong>#include&ltmach/rpc.h&gt</strong>

<strong>mach_rpc_return_t   mach_rpc_trap</strong>
                     <strong>(mach_port_t</strong>                    <var>dest_port</var>,
                      <strong>mach_rpc_id_t</strong>                <var>routine_num</var>,
                      <strong>mach_rpc_signature_t</strong>       <var>signature_ptr</var>,
                      <strong>mach_rpc_size_t</strong>           <var>signature_size</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>dest_port</var>
<dd>
[in send right] The port representing the destination of the RPC
     (usually a registered subsystem established by a call to
     <strong>mach_port_allocate_subsystem</strong>).
<p>
<dt> <var>routine_num</var>
<dd>
[in scalar] Identifier of the server work function.
<p>
<dt> <var>signature_ptr</var>
<dd>
[in pointer] Pointer to the call's <strong>mach_rpc_signature</strong> structure.
<p>
<dt> <var>signature_size</var>
<dd>
[in scalar] Size, in bytes, of the call's <strong>mach_rpc_signature</strong> structure.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>mach_rpc_trap</strong> system trap is the entry point for the
invoke side of the Mach RPC service used to transfer control to an RPC server.
The trap is accessed via the MIG generated
<strong>MACH_RPC</strong> macro
which is invoked transparently when the <strong>mach_rpc</strong> feature is enabled.
This function is not designed for use directly by the user. It is
automatically generated by MIG to handle a function call.
<p>
For a
complete description of this functionality, refer to: Burke, Edward,
Michael Condict, David Mitchell, Franklin Reynolds, Peter Watkins,
William Willcox, "RPC Design for Real-Time Mach," OSF Research
Institute, Cambridge, MA.
<h3>NOTES</h3>
<p>
This interface is experimental and therefore subject to change.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_FAILURE</strong>
<dd>
Either the argument copyin failed, there were too many arguments, or
the argument copyout failed.
<p>
<dt> <strong>KERN_INVALID_ARGUMENT</strong>
<dd>
The dest_port, signature_ptr, and/or the subsystem associated with the
dest_port is invalid; the siganture_size is less than, or equal to, zero.
<p>
<dt> <strong>KERN_NO_ACCESS</strong>
<dd>
The kernel port associated with the dest_port name is a norma proxy
port.
<p>
<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
<dd>
The kernel could not allocate storage for an internal rpc state
structure.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="mach_rpc_return_trap.html"><strong>mach_rpc_return_trap</strong></a>,
<a href="thread_activation_create.html"><strong>thread_activation_create</strong></a>,
<a href="MP_allocate_subsystem.html"><strong>mach_port_allocate_subsystem</strong></a>,
<a href="mach_subsystem_create.html"><strong>mach_subsystem_create</strong></a>.
